<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${appname}-<c:if test="${!empty sessionScope._local_node_session}">${sessionScope._local_node_session.nodeName}-</c:if>${si:ctname("NET_TYPE",sessionScope._netType)}</title>
<%@ include file="/WEB-INF/view/common/css_js_ace.jsp"%>
<script type="text/javascript">
	$('.tipMe').tooltip({'placement':'top'});
	function search(form) {
		$(form).appendPagerParaStr();
		return true;
	}
</script>
</head>
<body>
	<%@ include file="/WEB-INF/view/common/topbar.jsp"%>
	<div class="main-container" id="main-container">
		<div class="main-container-inner">
			<%@ include file="/WEB-INF/view/common/sidebar.jsp"%>
			<div class="main-content">
				<div class="breadcrumbs" id="breadcrumbs">
					<ul class="breadcrumb">
						<li><a href="#"><i class="icon-home home-icon"></i>首页</a>
						</li>
						  <li>
                        <a href="#">系统管理</a>
                    </li>
                     <li>
                        <a href="#">日志管理</a>
                    </li>
						<li class="active">列表</li>
					</ul>
				</div>

				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">

							<div class="widget-box">
								<div class="widget-header widget-header-flat">
									<h5 class="smaller lighter">
										<i class="icon-list"></i> 日志管理
									</h5>
								</div>

								<div class="widget-body">
									<div class="widget-main">
										<form id="searchForm" class="form-search"
											action="${ctx}/pub/logmgr/list.do"
											method="post" onsubmit="return search(this)">
											<div class="row mg-top12">
												<div class="col-xs-4">
													<div class="input-group">
														<span class="input-group-addon">日志类型：</span> <input
															class="form-control" type="text" name="type" id="type"
															value="${param.type}" />
													</div>
												</div>
												<div class="col-xs-4">
													<div class="input-group">
														<span class="input-group-addon">日志级别：</span> <input
															class="form-control" type="text" name="level" id="level"
															value="${param.level}" />
													</div>
												</div>
											</div>
											<div class="row mg-top12">
												<div class="col-xs-4">
													<div class="input-group">
														<span class="input-group-addon">日志信息：</span> <input
															class="form-control" type="text" name="msg" id="msg"
															value="${param.msg}" />
													</div>
												</div>
												<div class="col-xs-4">
													<div class="input-group">
														<span class="input-group-btn">
															<button type="submit" class="btn btn-purple btn-sm">
																<i class="icon-search icon-on-right bigger-110"></i> 查询
															</button>&nbsp;&nbsp; </span>
													</div>
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>

							<div class="hr hr12 hr-dotted"></div>

							<div id="optDiv">
								<div class="table-responsive">
									<table id="sample-table-1"
										class="table table-striped table-bordered table-hover">
										<thead>
											<tr>
												<th style="width: 7%">日志类型</th>
												<th style="width: 8%">日志级别</th>
												<th style="width: 30%">出错行</th>
												<th style="width: 25%">日志信息</th>
												<th style="width: 15%">堆栈信息</th>
												<th style="width: 13%">时间</th>
											</tr>
										</thead>

										<tbody>
											<c:forEach var="vo" items="${logs}">
												<tr>
													<td>${vo.type}&nbsp;</td>
													<td>${vo.level}&nbsp;</td>
													<td class="left"><span class="tipMe" title="${vo.line}">${si:lmitStrPx(vo.line,350)}&nbsp;</span></td>
													<td class="left"><span class="tipMe" title="${vo.msg}">${si:lmitStrPx(vo.msg,350)}&nbsp;</span></td>
													<td class="left"><span class="tipMe" title="${vo.throwMsg}">${si:lmitStrPx(vo.throwMsg,200)}&nbsp;</span></td></td>
													<td>${si:fmtDate(vo.date)}&nbsp;</td>
												</tr>
											</c:forEach>
										</tbody>
									</table>

									<jsp:include page="/WEB-INF/view/common/pg.jsp">
										<jsp:param value="${ctx}/pub/logmgr/list.do"
											name="url" />
										<jsp:param value="${_total}" name="total" />
										<jsp:param value="${_urlpara}" name="urlpara" />
									</jsp:include>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
